-- GENERATED SPELL FOR [Shadowsworn Warlock] --


function spell0_6008(pUnit, Event) --@Curse of Weakness,n/a--
pUnit:FullCastSpellOnTarget(11980,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6008', 571, 1)
end

function spell1_6008(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(20825,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_6008', 3000, 1)
end

function spell2_6008(pUnit, Event) --@Voidwalker,Self--
pUnit:FullCastSpellOnTarget(5108,pUnit)
pUnit:RegisterEvent('Sorts_6008', 0, 1)
end

function Sorts_6008(pUnit, Event)
local choix_sorts_6008 = math.random(0, 2)
if choix_sorts_6008 == 0 then
pUnit:RegisterEvent('spell0_6008', 1, 1)
end
if choix_sorts_6008 == 1 then
pUnit:RegisterEvent('spell1_6008', 1, 1)
end
if choix_sorts_6008 == 2 then
pUnit:RegisterEvent('spell2_6008', 1, 1)
end
end

function mob6008_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_6008', math.random(1500, 3000), 1)
end

function mob6008_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6008_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob6008_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(6008, 1, 'mob6008_Action')
RegisterUnitEvent(6008, 2, 'mob6008_Leave')
RegisterUnitEvent(6008, 3, 'mob6008_Kill')
RegisterUnitEvent(6008, 4, 'mob6008_Die')
